#include "command.h"

void command_rm(command_t *ct, int netFD, MYSQL *conn, client_t *cl){
    char buf[1024] = { 0 };
    char curr[800] = { 0 };
    sprintf(curr, "%s/%s", cl->dir_path, ct->path);
    sprintf(buf, "delete from file where path = '%s'", curr);
    if (mysql_query(conn, buf)) {
        printf("%s\n", mysql_error(conn));
        return;
    }
    int num = 1;
    send(netFD, &num, sizeof(int), MSG_NOSIGNAL);

}
